/**
 * Copyright (c) 2006-2012 Las Venturas Playground, LVP Mineground
 *
 * This program is free software: you can redistribute it and/or modify it under the terms of the
 * GNU General Public License as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.mineground.protect;

import java.util.HashMap;

import org.bukkit.block.Block;
import org.bukkit.entity.Player;

public class FocusTracker {
    private HashMap<Player, Block> mPlayerBlockFocusMap;
    
    public FocusTracker() {
        mPlayerBlockFocusMap = new HashMap<Player, Block>(25);
    }
    
    public Block updateAndReturnPreviousValue(Player player, Block block) {
        return mPlayerBlockFocusMap.put(player, block);
    }
    
    public void update(Player player, Block block) {
        mPlayerBlockFocusMap.put(player, block);
    }
}
